package com.example.school.controller.list;

import com.example.school.pojo.Address;
import com.example.school.service.AddressService;
import com.example.school.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/list/api")
public class AddressListController {

    @Autowired
    private AddressService addressService;

    @GetMapping("/address")
    public Result addressList(){
        return Result.okResult(addressService.list());
    }

}
